<?php
/**
 * Radcodes - SocialEngine Module
 *
 * @category   Application_Extensions
 * @package    Game
 * @copyright  Copyright (c) 2009-2010 Radcodes LLC (http://www.radcodes.com)
 * @license    http://www.radcodes.com/license/
 * @version    $Id$
 * @author     Vincent Van <vincent@radcodes.com>
 */ 
class Game_Form_Game_Edit extends Game_Form_Game_Create
{
  protected $_item;

  public function getItem()
  {
    return $this->_item;
  }

  public function setItem(Core_Model_Item_Abstract $item)
  {
    $this->_item = $item;
    return $this;
  }
  
  public function init()
  {
  	parent::init();
  	
    $this->setTitle('Edit Game')
      ->setDescription('Edit your game below, then click "Save Changes" to save your game.');

    $this->photo->setRequired(false);
    $this->photo->setAllowEmpty(true);
    $this->swf_file->setRequired(false);
    $this->swf_file->setAllowEmpty(true);          
      
    $this->submit->setLabel('Save Changes');

    $this->cancel->setLabel('view');
    $this->cancel->setAttrib('href', $this->_item->getHref());     
    
  }

}